<?php

namespace app\admin\validate;

use app\common\enums\StatusEnum;
use think\Validate;

class Role extends Validate
{
    protected $rule = [
        'name|角色名称' => 'require|length:1,50|unique:role',
        'description|角色描述' => 'length:1,200',
        'status|状态' => 'in:' . StatusEnum::ENABLED . ',' . StatusEnum::DISABLED,
        'permission_id|权限' => 'require',
    ];
}